<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-html"  prefix="html"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <link href="CSS/Accessible_Design.css" rel="stylesheet" type="text/css" />
    <base href="<%=basePath%>">
    
    <title>成员管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" language="java">
 	 function selectid(object){
	  var namelist=document.getElementsByName('user');
	  for(var i=0;i<namelist.length;i++)
		  {
		  var e=namelist[i];
		  e.checked=object.checked;
		  }
		  
		  }
		  
	function submitSelect(){
	 var myform  = document.getElementById("userForm");

	 var userAccount=myform.userAccount.value;
		 alert(userAccount);
	//myform.target="_blank" //也可以是_self,_top,_parent,默认为_self 
	myform.action="selectUserByUserAccount.do?userAccount=userAccount"; 
	myform.submit();  
	}	  
  
 
 </script>
 
  </head>
  
  <body>
  <html:form action="deletemenber.do" styleId="userForm">
    <table width="543" height="141" border="1" cellspacing="0" class="small">
  <tr>
    <td height="15" colspan="5"><label></label>
      <label>
      <div align="center">用户管理</div>
      </label></td>
  </tr>
	  <tr>
	   	<td height="25" colspan="5"><label>账户名
	        <html:text property="userAccount"/>
			<html:submit value="查询"  onclick="submitSelect();"/>
			
			
	    	</label>
	    	
	    	<a href="admin/ReadExcel.jsp" > 数据导入
	    	</a>
	     </td>
	  </tr>
  <tr>
  

	  <tr>
	    <td width="80" >
		<html:checkbox property="alluser" onclick="selectid(this);">全选</html:checkbox>
		</td>
	    <td width="107">帐户名</td>
	    <td width="73">密码</td>
	    <td width="172">修改</td>
	  </tr>
	 
 	 <c:forEach items="${userlist}" var="menber">
 	
 	 <tr>
	    <td height="30">
	      <html:checkbox property="user" value="${menber.id }"></html:checkbox>
	    </td>
	    <td>${menber.userAccount }</td>
	    <td>${menber.password }</td>
	    <td><a href="selectmenberbyid.do?userId=${menber.id}">修改</a></td>
  	</tr>
  	
  	
  </c:forEach>
  <tr>
  
  <td colspan="5">
  	<html:submit value="删除"/>
  	
  <a href="selectroleallorcollege.do">添加</a>
  </td>
  </tr>
<tr>
	<td colspan="5">
	<a href="menbermag.do?pageNum=${firstPage}">首页</a>|<a href="menbermag.do?pageNum=${proPage}">上一页</a>|<a href="menbermag.do?pageNum=${nextPage}">下一页</a>|<a href="menbermag.do?pageNum=${lastPage}">最后一页</a>
	</td>

</tr>
</table>
  </html:form>
  </body>
</html>
